﻿namespace WebSocketApi.Interface
{

    /// <summary>
    /// 消息缓存接口
    /// </summary>
    public interface INoticeCacheManager
    {
        /// <summary>
        /// 获取用户所有离线消息
        /// </summary>
        /// <param name="toUser">接收人</param>
        /// <returns></returns>
        List<object> GetUserAllHistoryNotices(string toUser);

        /// <summary>
        /// 缓存离线消息
        /// </summary>
        /// <param name="toUser">接收人</param>
        /// <param name="message"></param>
        void AddNotice(string toUser, object message);

        /// <summary>
        /// 缓存消息发送记录
        /// </summary>
        /// <param name="toUser">接收人</param>
        /// <param name="message"></param>
        void AddNoticeRecord(string toUser, object message);

        /// <summary>
        /// 删除缓存中的消息
        /// </summary>
        /// <param name="toUser">接收人</param>
        void RemoveNotice(string toUser);

    }

}
